<script lang="ts" setup>
import { useAppStore } from "@/store/modules/app";
import { showToast } from "@nutui/nutui";
import "@nutui/nutui/dist/packages/toast/style";

const appStore = useAppStore();

const handleClear = () => {
  localStorage.clear();
  showToast.text("清除成功");
};

const enableVColnsole = computed({
  get: () => appStore.enableVConsole,
  set: (val) => appStore.updateEnableVConsole(val),
});
</script>

<template>
  <div>
    <nut-button type="primary" @click="handleClear">清空缓存</nut-button>
    <nut-switch v-model="enableVColnsole">vConsole</nut-switch>
  </div>
</template>

<style scoped></style>
